#include "stdafx.h"

// DEBUG MODE, STREAM PRINTS MESSAGES
#ifdef _DEBUG

#include <iostream>

MyDebugStream &MyDebugStream::operator<<(char value)
{
    std::cerr << value;
    return *this;
}

MyDebugStream &MyDebugStream::operator<<(const char* value)
{
    std::cerr << value;
    return *this;
}

MyDebugStream &MyDebugStream::operator<<(const std::string &value)
{
    std::cerr << value;
    return *this;
}

MyDebugStream &MyDebugStream::operator<<(int value)
{
    std::cerr << value;
    return *this;
}

MyDebugStream &MyDebugStream::operator<<(unsigned value)
{
    std::cerr << value;
    return *this;
}

MyDebugStream &MyDebugStream::operator<<(long long int value)
{
    std::cerr << value;
    return *this;
}

MyDebugStream &MyDebugStream::operator<<(long long unsigned value)
{
    std::cerr << value;
    return *this;
}

MyDebugStream &MyDebugStream::operator<<(float value)
{
    std::cerr << value;
    return *this;
}

MyDebugStream &MyDebugStream::operator<<(double value)
{
    std::cerr << value;
    return *this;
}

MyDebugStream &MyDebugStream::operator<<(bool value)
{
    std::cerr << value;
    return *this;
}

#else
// RELEASE MODE, STREAM DOES NOTHING

MyDebugStream &MyDebugStream::operator<<(char)
{
    return *this;
}

MyDebugStream &MyDebugStream::operator<<(const char*)
{
    return *this;
}

MyDebugStream &MyDebugStream::operator<<(const std::string&)
{
    return *this;
}

MyDebugStream &MyDebugStream::operator<<(int)
{
    return *this;
}

MyDebugStream &MyDebugStream::operator<<(unsigned)
{
    return *this;
}

MyDebugStream &MyDebugStream::operator<<(long long int)
{
    return *this;
}

MyDebugStream &MyDebugStream::operator<<(long long unsigned)
{
    return *this;
}

MyDebugStream &MyDebugStream::operator<<(float)
{
    return *this;
}

MyDebugStream &MyDebugStream::operator<<(double)
{
    return *this;
}

MyDebugStream &MyDebugStream::operator<<(bool)
{
    return *this;
}

#endif

static
MyDebugStream _g_debugStream;

MyDebugStream& myDebug()
{
    return _g_debugStream;
}
